package com.xlp.factory;

import com.xlp.additive.*;

public class AdditiveFactory {
    public static Additive makeAdditive(int selected){
        switch (selected){
            case 1:
                return RedBean.of();

            case 2:
                return TaroBall.of();

            case 3:
                return OlioMilkCap.of();

            case 4:
                return CheeseMilkCap.of();

            default:
                throw new IllegalArgumentException("用户输入数据异常，点单失败！");
        }
    }
}
